This window type can only be used on wayland so far, so NULL is returned
if it's attempted to be used on any other windowing backend.
https://bugzilla.gnome.org/show_bug.cgi?id=729215
/* for the use of round() */
#include "fallback-c89.c"
+#ifdef GDK_WINDOWING_WAYLAND
+#include "wayland/gdkwayland.h"
+#endif
+
#undef DEBUG_WINDOW_PRINTING
g_warning (G_STRLOC "Toplevel windows must be created as children of\n"
"of a window of type GDK_WINDOW_ROOT or GDK_WINDOW_FOREIGN");
break;
+ case GDK_WINDOW_SUBSURFACE:
+#ifdef GDK_WINDOWING_WAYLAND
+ if (!GDK_IS_WAYLAND_DISPLAY (display))
+ {
+ g_warning (G_STRLOC "Subsurface windows can only be used on Wayland");
+ return NULL;
+ }
+#endif
+ break;
case GDK_WINDOW_CHILD:
break;
default:
* @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
* @GDK_WINDOW_OFFSCREEN: offscreen window (see
* [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
+ * @GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually
+ * tied to a toplevel, and is moved/stacked with it. Currently this window
+ * type is only implemented in Wayland. Since 3.14
*
* Describes the kind of window.
*/
GDK_WINDOW_CHILD,
GDK_WINDOW_TEMP,
GDK_WINDOW_FOREIGN,
- GDK_WINDOW_OFFSCREEN
+ GDK_WINDOW_OFFSCREEN,
+ GDK_WINDOW_SUBSURFACE
} GdkWindowType;
/**